package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 收货登记
 * </p>
 *
 * @author LEO
 * @since 2020-08-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_receive_register")
@ApiModel(value="ReceiveRegister对象", description="收货登记")
public class ReceiveRegister extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "收货单号")
    @TableField("receive_code")
    private String receiveCode;

    @ApiModelProperty(value = "组织机构")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "收货明细标识")
    @TableField("receive_item_code")
    private String receiveItemCode;

    @ApiModelProperty(value = "收货数量")
    @TableField("received_quantity")
    @Digits(integer = 14,fraction = 6, message = "收货数量超过了允许范围（只允许14位整数和6位小数范围内）", groups = {ReceiveRegister.Save.class})
    private BigDecimal receivedQuantity;

    @ApiModelProperty(value = "基本单位下的收货数量")
    @TableField("basic_quantity")
    private BigDecimal basicQuantity;

    @ApiModelProperty(value = "商品编码")
    @TableField("goods_code")
    private String goodsCode;

    @ApiModelProperty(value = "容器号")
    @TableField("container_bar_code")
    private String containerBarCode;

    @ApiModelProperty(value = "容器类型")
    @TableField("container_type")
    private String containerType;

    @ApiModelProperty(value = "上架数量")
    @TableField("putaway_quantity")
    private BigDecimal putawayQuantity;

    @ApiModelProperty(value = "入库数量")
    @TableField("inbound_quantity")
    private BigDecimal inboundQuantity;

    @ApiModelProperty(value = "生产日期")
    @TableField("gmt_manufacture")
    private LocalDateTime gmtManufacture;

    @ApiModelProperty(value = "过期日期")
    @TableField("gmt_expire")
    private LocalDateTime gmtExpire;

    @ApiModelProperty(value = "库存批次")
    @TableField("lot")
    private String lot;

    @ApiModelProperty(value = "收货批次")
    @TableField("receive_lot")
    private String receiveLot;

    @ApiModelProperty(value = "存货日期")
    @TableField("gmt_stock")
    private LocalDateTime gmtStock;

    @ApiModelProperty(value = "供应商")
    @TableField("supplier")
    @Length(max = 100, message = "供应商长度不能大于100", groups = {ReceiveRegister.Save.class})
    private String supplier;

    @ApiModelProperty(value = "序列号")
    @TableField("serial_number")
    @Length(max = 100, message = "序列号长度不能大于100", groups = {ReceiveRegister.Save.class})
    private String serialNumber;

    @ApiModelProperty(value = "扩展1")
    @TableField("extend_one")
    @Length(max = 100, message = "扩展1长度不能大于100", groups = {ReceiveRegister.Save.class})
    private String extendOne;

    @ApiModelProperty(value = "扩展2")
    @TableField("extend_two")
    @Length(max = 100, message = "扩展2长度不能大于100", groups = {ReceiveRegister.Save.class})
    private String extendTwo;

    @ApiModelProperty(value = "扩展3")
    @TableField("extend_three")
    @Digits(integer = 14,fraction = 6, message = "扩展3超过了允许范围（只允许14位整数和6位小数范围内）", groups = {ReceiveRegister.Save.class})
    private BigDecimal extendThree;

    @ApiModelProperty(value = "扩展4")
    @TableField("extend_four")
    @Digits(integer = 14,fraction = 6, message = "扩展4超过了允许范围（只允许14位整数和6位小数范围内）", groups = {ReceiveRegister.Save.class})
    private BigDecimal extendFour;

    @ApiModelProperty(value = "扩展5")
    @TableField("extend_five")
    private LocalDateTime extendFive;

    @ApiModelProperty(value = "扩展6")
    @TableField("extend_six")
    private LocalDateTime extendSix;

    @ApiModelProperty(value = "当前商品单位转基本单位件装量")
    @TableField("unit_convert_quantity")
    private BigDecimal unitConvertQuantity;

    @ApiModelProperty(value = "货品状态（待废弃）")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "货品状态")
    @TableField("goods_status")
    private String goodsStatus;

    @ApiModelProperty(value = "货品状态名称")
    @TableField("goods_status_name")
    private String goodsStatusName;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "临时库存编码")
    @TableField("temp_inventory_code")
    private String tempInventoryCode;

    @ApiModelProperty(value = "单位")
    @TableField("goods_unit")
    private String goodsUnit;

    @ApiModelProperty(value = "单位名称")
    @TableField("goods_unit_name")
    private String goodsUnitName;

    @ApiModelProperty(value = "基本单位")
    @TableField("basic_unit")
    private String basicUnit;

    @ApiModelProperty(value = "基本单位名称")
    @TableField("basic_unit_name")
    private String basicUnitName;

    @ApiModelProperty(value = "任务号")
    @TableField("task_code")
    private String taskCode;

    @ApiModelProperty(value = "作业人编码")
    @TableField("operator_by")
    private String operatorBy;

    @ApiModelProperty(value = "作业人名称")
    @TableField("operator_name")
    private String operatorName;

    @ApiModelProperty(value = "上架单号")
    @TableField("putaway_code")
    private String putawayCode;

    public interface Save{}

    @ApiModelProperty(value = "计划数量")
    @TableField("plan_quantity")
    private BigDecimal planQuantity;

    @ApiModelProperty(value = "波次单号")
    @TableField("wave_picking_code")
    private String wavePickingCode;

}
